package cn.base.day08;

public class Test04 {
    public static void main(String[] args) {
        String s = "sf2J@3jSs%4DkaF^5lG(f";
        int count1 = 0;//大写
        int count2 = 0;//小写
        int count3 = 0;//数字
        // 遍历字符串
        char[] chars = s.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] >= 'A' && chars[i] <= 'Z') {
                count1++;
            }
            if (chars[i] >= 'a' && chars[i] <= 'z') {
                count2++;
            }
            if (chars[i] >= '0' && chars[i] <= '9') {
                count3++;
            }
        }
        System.out.println(count1);
        System.out.println(count2);
        System.out.println(count3);
    }
}
